﻿<!--
Copyright © Pavel Fedarovich, 2010-2012

This file is part of AvalonWizard.
 
You may at your option receive a license to Avalon Wizard under 
either the terms of the Apache License version 2.0 or 
the GNU Lesser General Public License (LGPL) version 2.1 or any later version.
 
AvalonWizard is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
You may obtain a copy of the Apache License at [http://www.apache.org/licenses/LICENSE-2.0].
You may obtain a copy of the LGPL at [http://www.gnu.org/licenses/].
-->
<UserControl x:Class="AvalonWizard.Design.Adorners.WizardAdornerView" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:prop="clr-namespace:AvalonWizard.Design.Properties" xmlns:local="clr-namespace:AvalonWizard.Design" xmlns:Effects="clr-namespace:AvalonWizard.Design.Effects" mc:Ignorable="d" d:DesignHeight="56" d:DesignWidth="300">
	<StackPanel Orientation="Horizontal" Margin="0,12" SnapsToDevicePixels="True">
		<StackPanel.Resources>
			<local:ImageSourceConverter x:Key="ImageSourceConverter" />
			<Style TargetType="Button">
				<Setter Property="Width" Value="24" />
				<Setter Property="Height" Value="24" />
				<Setter Property="Margin" Value="1" />
				<Setter Property="Focusable" Value="False" />
				<Setter Property="ContentTemplate">
					<Setter.Value>
						<DataTemplate>
							<Image Source="{Binding Converter={StaticResource ImageSourceConverter}}" Width="16" Height="16" />
						</DataTemplate>
					</Setter.Value>
				</Setter>
				<Style.Triggers>
					<Trigger Property="IsEnabled" Value="False">
						<Setter Property="ContentTemplate">
							<Setter.Value>
								<DataTemplate>
									<Image Source="{Binding Converter={StaticResource ImageSourceConverter}}" Width="16" Height="16" Opacity="0.5">
										<Image.Effect>
											<Effects:GrayscaleEffect />
										</Image.Effect>
									</Image>
								</DataTemplate>
							</Setter.Value>
						</Setter>
					</Trigger>
				</Style.Triggers>
			</Style>
			<Style TargetType="Border">
				<Setter Property="Background" Value="#447FAAFF" />
				<Setter Property="BorderThickness" Value="1" />
				<Setter Property="BorderBrush" Value="#9ABFE5" />
				<Setter Property="CornerRadius" Value="3" />
				<Setter Property="Padding" Value="2" />
				<Setter Property="Margin" Value="0,0,5,0" />
				<Setter Property="Margin" Value="0,0,5,0" />
			</Style>
		</StackPanel.Resources>
		<Border>
			<StackPanel Orientation="Horizontal">
				<Button ToolTip="{x:Static prop:Resources.FirstPageText}" Command="{Binding GoToFirstPage}" Content="GoToFirstPage.png" />
				<Button ToolTip="{x:Static prop:Resources.PreviousPageText}" Command="{Binding GoToPreviousPage}" Content="GoToPreviousPage.png" />
				<TextBox Width="40" Margin="1" Text="{Binding PageIndex, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" VerticalContentAlignment="Center" />
				<Button ToolTip="{x:Static prop:Resources.NextPageText}" Command="{Binding GoToNextPage}" Content="GoToNextPage.png" />
				<Button ToolTip="{x:Static prop:Resources.LastPageText}" Command="{Binding GoToLastPage}" Content="GoToLastPage.png" />
			</StackPanel>
		</Border>
		<Border>
			<StackPanel Orientation="Horizontal">
				<Button ToolTip="{x:Static prop:Resources.AddPageText}" Command="{Binding AddPage}" Content="AddPage.png" />
				<Button ToolTip="{x:Static prop:Resources.InsertPageText}" Command="{Binding InsertPage}" Content="InsertPage.png" />
				<Button ToolTip="{x:Static prop:Resources.RemovePageText}" Command="{Binding RemovePage}" Content="RemovePage.png" />
			</StackPanel>
		</Border>
	</StackPanel>
</UserControl>